﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;

namespace BLL
{
  
    public class AuctionBLL
    { 
        AuctionDAL dal = new AuctionDAL();
        public List<Auction> auctions()
        {
            return dal.auctions();
        }
        public bool Inset(Auction au)
        {
            return dal.Inset(au);
        }
        public bool UpdateAuc(Auction au)
        {
            return dal.UpdateAuc(au);
        }
        public bool DeleteAue(Auction au)
        {
            return dal.DeleteAue(au);
        }
        public Auction Fid(int id)
        {
            return dal.auctions().Where(a=>a.AuctionID==id).FirstOrDefault();
        }
        public List<Auction> Gid(Auction at)
        {
            return dal.auctions().Where(a => a.AuctionName.Contains(at.AuctionName) ).ToList();
        }
    }
}
